Skip to content

mlir: ease the interoperability with a local LLVM checkout - #128

Merged
guillon merged 4 commits into
xtc-tools:mainfrom
qaco:hugo/llvm-local-interop
Sep 7, 2026
Merged

mlir: ease the interoperability with a local LLVM checkout#128
guillon merged 4 commits into
xtc-tools:mainfrom
qaco:hugo/llvm-local-interop

Conversation

@qaco

@qaco qaco commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Motivation

Being able to evaluate the impact of upstream changes (or patches to upstream) on XTC codegen.

Description

Encapsulate the XTC extensions to MLIR bindings, discard deprecated options, warmup TVM before the other backends (in loop-explore).

@qaco
qaco requested a review from guillon September 4, 2026 11:58
@qaco qaco self-assigned this Sep 4, 2026
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/xtc/backends/mlir/MlirBindingsExtensions.py 83.33% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@guillon guillon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine, but see comments, I will add @liamsemeria to the review for checking the local MLIR and xtc_transform stuff

Comment thread src/xtc/backends/mlir/MlirCompilerPasses.py
Comment thread src/xtc/search/explore.py Outdated
for name in Optimizers.names():
print(f"{name}")

def _warmup_llvm_backends(self) -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure of the intention there, though there is an old ordering of the backends which order import of mlir backend before import of tvm backend above in the config post init. Can you check if it's still required?:

    def __post_init__(self):
       ...
          # Workaround to ensure that TVM backend is after MLIR backends,
          # otherwise the import of tvm breaks the MLIR python bindings
          self.backends = sorted(self.backends)

@qaco qaco Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I changed the order in post_init and removed my warmup

@guillon
guillon merged commit 2c85221 into xtc-tools:main Sep 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants